@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap');

:root {
    --primary-color: #005A9C;
    --secondary-color: #51dadf;
    --light-gray: #f4f4f4;
    --dark-gray: #333;
    --white: #ffffff;
    --event-dot: #E94560;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--light-gray);
    color: var(--dark-gray);
}

header {
    background: #fff;
    padding: 0px 2%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 5px; /* espacio entre el logo y el texto */
}

.logo-img {
    height: 60px; /* tamaño del logo */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    letter-spacing: 5px;
}

nav .logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--secondary-color);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 2rem;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
}

.cta-button, .cta-button-nav {
    background: var(--primary-color);
    color: #fff;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.cta-button-nav {
    background: var(--secondary-color);
    color: var(--dark-color);
}

.cta-button:hover, .cta-button-nav:hover {
    transform: translateY(-3px);
    background-color: #5cc3c2;
}

.cta-button-nav:hover {
     background-color: #ffda44;
}
header h1 {
    margin: 0;
    font-weight: 700;
}

.container {
    display: flex;
    flex-wrap: wrap;
    padding: 2rem;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}
#search-input {
    padding: 0.5rem 0.8rem;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 0.9rem;
    width: 250px;
    max-width: 100%;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 90, 156, 0.2);
}

#convocatorias {
    flex: 2;
    min-width: 300px;
}
.convocatorias-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    border-bottom: 2px solid #ffb655;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

#calendario {
    flex: 1;
    min-width: 300px;
    position: sticky;
    top: 2rem;
    align-self: flex-start;
}

h2 {
    color: var(--primary-color);
    padding-bottom: 0.5rem;
    margin-top: 20px;
}

/* Convocatorias */
#convocatorias-lista {
    display: grid;
    gap: 1.5rem;
}

.convocatoria-card {
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.convocatoria-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.convocatoria-logo {
    flex-shrink: 0;
}

.convocatoria-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 50%;
    background-color: var(--light-gray);
}

.convocatoria-info h3 {
    margin: 0 0 0.5rem 0;
}

.convocatoria-info h3 a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
}
.convocatoria-info h3 a:hover {
    text-decoration: underline;
}

.convocatoria-info ul {
    list-style: none;
    padding: 0;
    margin: 0;
    color: #555;
}

.convocatoria-info li {
    padding: 0.2rem 0;
}

.convocatoria-info li strong {
    color: var(--dark-gray);
}


/* Calendario */
#calendario-container, #event-details {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

#event-details {
    margin-top: 1rem;
}

.calendario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendario-header h3 {
    margin: 0;
    text-transform: capitalize;
}

.calendario-header button {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0.5rem;
    line-height: 1;
}

.calendario-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    text-align: center;
}

.calendario-grid div {
    padding: 0.5rem;
    border-radius: 4px;
    position: relative;
}

.day-name {
    font-weight: bold;
    color: var(--primary-color);
}

.day {
    cursor: pointer;
    transition: background-color 0.2s;
}

.day:hover:not(.empty) {
    background-color: var(--light-gray);
}

.empty {
    cursor: default;
}

.today {
    background-color: #ffb655;
    color: var(--dark-gray);
    font-weight: bold;
}

.selected {
    background-color: var(--primary-color) !important;
    color: var(--white) !important;
}

.event-dot {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: var(--event-dot);
    border-radius: 50%;
}

#event-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.9rem;
}

#event-list li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #eee;
}
#event-list li:last-child {
    border-bottom: none;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 25px;
    height: 20px;
    cursor: pointer;
    margin-left: 10px; /* separación respecto al logo */
}

.hamburger span {
    display: block;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        background: white;
        position: absolute;
        top: 70px; /* debajo del header */
        left: 0;
        padding: 1rem 0;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        z-index: 999;
    }
    nav ul li {
        margin: 1rem 0;
        text-align: center;
    }
    nav ul.show {
        display: flex;
    }
}

footer {
    background-color: #2c3e50;
    color: white;
    padding: 25px 0;
    text-align: center;
    width: 100%;
}

.social-media {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; /* Space between icons */
    margin-bottom: 15px;
}

.social-media a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px; 
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-media a:hover {
    color: #3498db; 
    transform: translateY(-3px); 
}

/* Icon specific styles */
.social-media i {
    font-size: 1.8rem;
}

.footer-text {
    font-size: 0.9rem;
    color: #bdc3c7;
    margin-top: 10px;
}
@media (max-width: 600px) {
    .social-media {
        gap: 15px; /* menos espacio entre íconos */
    }
    .social-media i {
        font-size: 1.3rem; /* íconos más pequeños */
    }
    .footer-text {
        font-size: 0.8rem; /* texto más legible en móvil */
    }
}

@media (max-width: 768px) {
    nav ul {
        display: none; /* Simple responsive behavior for now */
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }
    
    section h2 {
        font-size: 2rem;
    }
}
